<!-- $Id: brand_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{include file="pageheader.htm"} {insert_scripts files="../js/utils.js,selectzone.js,validator.js"}<div id="tabbar-div">		<p>			<span class="tab-back" id="general-tab">通用信息</span>			<span class="tab-back" id="detail-tab">品牌简介</span>		</p>	</div>
<div class="tabbody-div">
<form method="post" action="brand.php" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
<table cellspacing="1" cellpadding="3" width="100%" id="general-table">
  <tr>
    <td class="label">{$lang.brand_name}</td>
    <td><input type="text" name="brand_name" maxlength="60" value="{$brand.brand_name}" />{$lang.require_field}</td>
  </tr>	  <tr>    <td class="label">{$lang.brand_short}</td>    <td><select name="brand_short" >    					{foreach from=$brand_shortoo key=num item="book"}     									{if $num eq $brand.brand_short}    									<option value="{$num}" selected="selected">{$book}</option>    									{else}							       	<option value="{$num}">{$book}</option>							       	{/if}							{/foreach}     		</select>    </td>  </tr>  	  <tr>    <td class="label">{$lang.brand_other_name}</td>    <td><input type="text" name="brand_other_name" maxlength="40" size="15" value="{$brand.brand_other_name}" />    </td>  </tr>  <tr>    <td class="label">{$lang.brand_classify}</td>    <td>    		<!--<select name="brand_cat" >
    					{foreach from=$brand_cat key=num item="cat"} 
    									{if $cat.cat_id eq $brand.brand_cat}
    									<option value="{$cat.cat_id}" selected="selected">{$cat.cat_name}</option>
    									{else}
    									<option value="{$cat.cat_id}">{$cat.cat_name}</option>
    									{/if}
							       
							{/foreach} 
    		</select>-->    		<!--{foreach from=$brand_cat key=num item="cat"} 
    			{foreach from=$val_arr key=yy item="tt"} 
						{if $cat.cat_id eq $tt}
								<input type="checkbox" name="brand_cat[]" value="{$cat.cat_id}" checked>{$cat.cat_name}
						{else}
						{if $yy eq 0}
    					<input type="checkbox" name="brand_cat[]" value="{$cat.cat_id}" >{$cat.cat_name}
    				{/if}
    			{/if}
				{/foreach} 		
				{/foreach} -->				{foreach from=$val_arr key=yy item="tt"} 				{$tt}				{/foreach}    </td>  </tr>
  <!--<tr>

    <td class="label">{$lang.site_url}</td>

    <td><input type="text" name="site_url" maxlength="60" size="40" value="{$brand.site_url}" /></td>

  </tr>-->
  <tr>
    <td class="label"><a href="javascript:showNotice('warn_brandlogo');" title="{$lang.form_notice}">
        <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.brand_logo}</td>
    <td><input type="file" name="brand_logo" id="logo" size="45">{if $brand.brand_logo neq ""}<input type="button" value="{$lang.drop_brand_logo}" onclick="if (confirm('{$lang.confirm_drop_logo}'))location.href='brand.php?act=drop_logo&id={$brand.brand_id}'">{/if}
    <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="warn_brandlogo">
    {if $brand.brand_logo eq ''}
    {$lang.up_brandlogo}
    {else}
    {$lang.warn_brandlogo}
    {/if}
    </span>
    </td>
  </tr>    <tr>    <td class="label"></td>    <td>{if $brand.brand_logo neq ""}    	<img src="{$brand.brand_logo}" height="100" width="100">    	{/if}    </td>  </tr>  <tr>    <td class="label"><a href="javascript:showNotice('warn_brandlogo');" title="{$lang.form_notice}">        <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.brand_logo_big}</td>    <td><input type="file" name="brand_logo_big" id="logo" size="45">{if $brand.brand_logo_big neq ""}<input type="button" value="{$lang.drop_brand_logo}" onclick="if (confirm('{$lang.confirm_drop_logo}'))location.href='brand.php?act=drop_logo_big&id={$brand.brand_id}'">{/if}    <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="warn_brandlogo">    {if $brand.brand_logo_big eq ''}    {$lang.up_brandlogo_big}    {else}    {$lang.warn_brandlogo_big}    {/if}    </span>    </td>  </tr>    <tr>    <td class="label"></td>    <td>{if $brand.brand_logo_big }    	<img src="{$brand.brand_logo_big}" height="100" width="100">    	{/if}    </td>  </tr>    <tr>    <td class="label"><a href="javascript:showNotice('warn_brandlogo');" title="{$lang.form_notice}">        <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.brand_logo_small}</td>    <td><input type="file" name="brand_logo_small" id="logo" size="45">{if $brand.brand_logo_small neq ""}<input type="button" value="{$lang.drop_brand_logo}" onclick="if (confirm('{$lang.confirm_drop_logo}'))location.href='brand.php?act=drop_logo_small&id={$brand.brand_id}'">{/if}    <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="warn_brandlogo">    {if $brand.brand_logo_small eq ''}    {$lang.up_brandlogo_small}    {else}    {$lang.warn_brandlogo_small}    {/if}    </span>    </td>  </tr>
  <tr>

    <td class="label"></td>

    <td>{if $brand.brand_logo_small}    	<img src="{$brand.brand_logo_small}" height="100" width="100">    	{/if}    </td>

  </tr>
  <tr>
    <td class="label">{$lang.sort_order}</td>
    <td><input type="text" name="sort_order" maxlength="40" size="15" value="{$brand.sort_order}" /></td>
  </tr>
  <tr>
    <td class="label">品牌分类</td>
    <td>
		<input type="radio" name="brand_type" value="0" {if $brand.brand_type eq 0}checked="checked"{/if} /> 国内品牌
        <input type="radio" name="brand_type" value="1" {if $brand.brand_type eq 1}checked="checked"{/if} /> 国外品牌
    </td>
  </tr>    <tr>

    <td class="label">是否热销品牌</td>

    <td>

		<input type="radio" name="is_hot" value="0" {if $brand.is_hot eq 0}checked="checked"{/if} /> {$lang.no}

        <input type="radio" name="is_hot" value="1" {if $brand.is_hot eq 1}checked="checked"{/if} /> {$lang.yes}

    </td>

  </tr>
  <tr>
    <td class="label">{$lang.is_show}</td>
    <td><input type="radio" name="is_show" value="1" {if $brand.is_show eq 1}checked="checked"{/if} /> {$lang.yes}
        <input type="radio" name="is_show" value="0" {if $brand.is_show eq 0}checked="checked"{/if} /> {$lang.no}
        ({$lang.visibility_notes})
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center"><br />
    </td>
  </tr>
</table><table width="90%" id="detail-table" style="display:none">				<tr>					<td>{$FCKeditor}</td>				</tr>			</table><div class="button-div" > 			<input type="submit" class="button" value="{$lang.button_submit}" />      <input type="reset" class="button" value="{$lang.button_reset}" />      <input type="hidden" name="act" value="{$form_action}" />      <input type="hidden" name="old_brandname" value="{$brand.brand_name}" />      <input type="hidden" name="id" value="{$brand.brand_id}" />      <input type="hidden" name="old_brandlogo" value="{$brand.brand_logo}"></div>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
<!--
document.forms['theForm'].elements['brand_name'].focus();
onload = function()
{
    // 开始检查订单
    startCheckOrder();
}document.getElementById("tabbar-div").onmouseover = function(e)		{		    var obj = Utils.srcElement(e);				    if (obj.className == "tab-back")		    {		        obj.className = "tab-hover";		    }		}				document.getElementById("tabbar-div").onmouseout = function(e)		{		    var obj = Utils.srcElement(e);				    if (obj.className == "tab-hover")		    {		        obj.className = "tab-back";		    }		}				document.getElementById("tabbar-div").onclick = function(e)		{		    var obj = Utils.srcElement(e);				    if (obj.className == "tab-front")		    {		        return;		    }		    else		    {		        objTable = obj.id.substring(0, obj.id.lastIndexOf("-")) + "-table";				        var tables = document.getElementsByTagName("table");		        var spans  = document.getElementsByTagName("span");				        for (i = 0; i < tables.length; i++)		        {		            if (tables[i].id == objTable)		            {		                tables[i].style.display = (Browser.isIE) ? "block" : "table";		            }		            else		            {		                tables[i].style.display = "none";		            }		        }		        for (i = 0; spans.length; i++)		        {		            if (spans[i].className == "tab-front")		            {		                spans[i].className = "tab-back";		                obj.className = "tab-front";		                break;		            }		        }		    }		}
/**
 * 检查表单输入的数据
 */
function validate()
{
    validator = new Validator("theForm");
    validator.required("brand_name",  no_brandname);
    validator.isNumber("sort_order", require_num, true);
    return validator.passed();
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}